package com.gagakuai.bpm.domian.events;

import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;

/*
 * @program: bpm_server
 * @description: 死信处理事件
 * @author: houhong
 * @create: 2022-07-11 09:34
 */
@Slf4j
public class DeadMessageEvent extends BaseEvent<DeadMessageEvent.DeadMessageEventData> {


    public DeadMessageEvent(Object source) {
        super(source);
        log.info("#创建死信队列事件#");

        super.setEventData((DeadMessageEventData) source);
    }

    /*
     * 死信事件
     */
    public static class DeadMessageEventData {

        /*
         * 消息
         */
        private Message message;

        /*
         * 消息类型
         */
        private String messageType;

        private Channel channel;

        /*
        *  消息id
        *
        */
        private String correlationId;


        public String getCorrelationId() {
            return correlationId;
        }

        public void setCorrelationId(String correlationId) {
            this.correlationId = correlationId;
        }

        public Message getMessage() {
            return message;
        }

        public void setMessage(Message message) {
            this.message = message;
        }

        public String getMessageType() {
            return messageType;
        }

        public void setMessageType(String messageType) {
            this.messageType = messageType;
        }

        public Channel getChannel() {
            return channel;
        }

        public void setChannel(Channel channel) {
            this.channel = channel;
        }
    }
}